package concept.misc;
import java.util.Arrays;

public class ArrayLab
{
	static void doComparison()
	{
		String[][] array1 = {{"a","b"},{"c","d"}};
		String[][] array2 = {{"a","b"},{"c","d"}};
		
		System.out.println(array1.equals(array2));
		System.out.println(Arrays.asList(array1).equals(Arrays.asList(array2)));
	}
	static void doInitialization()
	{
		int[] is = new int[5];
		for(int i:is)
		{
			System.out.println(i);
		}
		Integer[] Is = new Integer[5];
		for(Integer i:Is)
		{
			System.out.println(i);
		}
		boolean[] bs = new boolean[5];
		if(bs[0])
		{
			System.out.println(bs[0]);
		}
		Boolean[] Bs = new Boolean[5];
		if(Bs[0])
		{
			System.out.println("True!");
		}
		else
		{
			System.out.println("False!");
		}
		
		int i = new Integer(0);
		System.out.println(i);
		String ss = null;
		String s = new String(ss);
		System.out.println(s);
		
	}
	static void doTypeChecking()
	{
		int[] x = new int[3];
		String[] s = new String[3];
		System.out.printf("%b\n", x instanceof int[]);
		System.out.printf("%b\n", s instanceof String[]);
		System.out.printf("%b\n", s instanceof CharSequence[]);
		System.out.printf("%b\n", s instanceof Object[]);
	}
	public static void main(String[] args)
	{
		//doInitialization();
		doTypeChecking();
	}
}
